package com.qfedu.service.impl;

import com.qfedu.dao.QuestionMapper;
import com.qfedu.pojo.entity.Question;
import com.qfedu.pojo.resp.BaseResp;
import com.qfedu.service.QuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class QuestionServiceImpl implements QuestionService {
    @Autowired
    QuestionMapper questionMapper;
    @Override
    public BaseResp findAll() {
        List<Question> all=questionMapper.findAll();
        return new BaseResp(1,"success",all,(long)all.size());
    }

    @Override
    public BaseResp findQAByQuestionId(Integer Id) {
        List<Question> all=questionMapper.findQAByQuestionId(Id);
        return new BaseResp(1,"success",all,(long)all.size());
    }


}
